home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 5 / BBS in a Box -Volume V (BBS in a Box) (April 1992).iso / Files / Prog / M / LSC213.cpt / DialogMgr.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-09-26  |  1.9 KB  |  116 lines  |  [TEXT/KAHL]

  1.  
  2. /*
  3.  *  DialogMgr.h
  4.  *
  5.  *  Copyright (c) 1986, 1987 THINK Technologies, Inc.
  6.  *  These interfaces are based on information copyrighted
  7.  *  by Apple Computer, Inc., 1985, 1986, 1987.
  8.  *
  9.  */
  10.  
  11. #ifndef    _DialogMgr_
  12. #define    _DialogMgr_
  13.     
  14. #ifndef    _MacTypes_
  15. #include "MacTypes.h"
  16. #endif
  17.  
  18. #ifndef    _WindowMgr_
  19. #include "WindowMgr.h"
  20. #endif
  21.  
  22. #ifndef    _TextEdit_
  23. #include "TextEdit.h"
  24. #endif
  25.  
  26. /*  item types  */
  27. enum {
  28.     userItem = 0,
  29.     ctrlItem = 4,
  30.     statText = 8,
  31.     editText = 16,
  32.     iconItem = 32,
  33.     picItem = 64,
  34.     itemDisable = 128
  35. };
  36.  
  37. /*  control item types  */
  38. enum {
  39.     btnCtrl,
  40.     chkCtrl,
  41.     radCtrl,
  42.     resCtrl
  43. };
  44.  
  45. /*  buttons  */
  46. enum {
  47.     OK = 1,
  48.     Cancel
  49. };
  50.  
  51. /*  alert icons  */
  52. enum {
  53.     stopIcon,
  54.     noteIcon,
  55.     cautionIcon
  56. };
  57. #define    ctnIcon        cautionIcon
  58.  
  59.  
  60. typedef    struct    DialogRecord
  61.     {
  62.     WindowRecord    window;
  63.     Handle            items ;
  64.     TEHandle        textH;
  65.     int                editField;
  66.     int                editOpen;
  67.     int                aDefItem;
  68.     } DialogRecord ;
  69. typedef DialogRecord *     DialogPeek;
  70. typedef WindowPtr     DialogPtr ;
  71.  
  72. typedef    struct    DialogTemplate
  73.     {
  74.     Rect            boundsRect;
  75.     int                procID;
  76.     char            visible;
  77.     char            filler1;
  78.     char            goAwayFlag;
  79.     char            filler2;
  80.     long            refCon;
  81.     int                itemsID;
  82.     Str255            title;
  83.     } DialogTemplate;
  84. typedef DialogTemplate *    DialogTPtr;
  85. typedef    DialogTPtr *        DialogTHndl;
  86.  
  87. typedef    struct    AlertTemplate
  88.     {
  89.     Rect            boundsRect;
  90.     int                itemsID;
  91.     unsigned int    boldItm4    : 1; /* this is StageList */
  92.     unsigned int    boxDrwn4    : 1;
  93.     unsigned int    sound4        : 2;    
  94.     unsigned int    boldItm3    : 1;
  95.     unsigned int    boxDrwn3    : 1;
  96.     unsigned int    sound3        : 2;    
  97.     unsigned int    boldItm2    : 1;
  98.     unsigned int    boxDrwn2    : 1;
  99.     unsigned int    sound2        : 2;    
  100.     unsigned int    boldItm1    : 1;
  101.     unsigned int    boxDrwn1    : 1;
  102.     unsigned int    sound1        : 2;
  103.     } AlertTemplate;
  104. typedef AlertTemplate *        AlertTPtr;
  105. typedef    AlertTPtr *        AlertTHndl;
  106.  
  107.  
  108.  
  109. /*  functions returning non-integral values  */
  110. pascal DialogPtr NewDialog();
  111. pascal DialogPtr GetNewDialog();
  112.  
  113. /*  low-memory globals  */
  114. extern ProcPtr ResumeProc : 0xA8C;
  115.  
  116. #endif _DialogMgr_